﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditLedger.aspx.cs" Inherits="Main_Ledger_EditLedger" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />
    <title>Edit Ledger</title>
     <link href="../../Styles/accounts.css" rel="Stylesheet" type="text/css" />
    <%--<script src="../../Menu/js/jquery.min.js" type="text/javascript"></script>--%>
    <script src="../../JavaScript/jquery-1.4.2.min.js" type="text/javascript"></script>
    <link href="../../Styles/HorizontalTab.css" rel="stylesheet" type="text/css" />
    <script src="../../JavaScript/HorizontalTab.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        function isNumberKey(control_id, evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode < 45 || charCode > 47))
                return false;

            if (charCode == 46) {
                var dotcount = document.getElementById(control_id).value.split('.').length - 1;
                if (dotcount >= 1) {
                    return false;
                }
            }

            return true;
        }

        function GetTextBoxValue(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById("TxtClosing").value = num1.toFixed(2);

        }
        function GetTextBoxValue1(control_id) {
            document.getElementById("txtAddName").value = document.getElementById(control_id).value;
        }
        function SetZero(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById(control_id).value = num1.toFixed(2);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        function setDebitCredit() {
            var num = document.getElementById("TxtOpeningBal").value;
            var num1 = new Number(num);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        function validateperiod() {
            var a = document.getElementById("txtCreditPeriod").value;
            if (a != '' && a > 365) {
                alert(' credit day not more than 365');
                document.getElementById("txtCreditPeriod").value = '365';
            }
        }
           function selectaddress()
            {            
                var chkadd = document.getElementById("chk");
                if(chkadd.checked == true)
                {
                  document.getElementById("txtDileveryName").value = document.getElementById("txtAddName").value;
                   document.getElementById("txtDileveryAddress1").value = document.getElementById("txtAddress1").value;
                   document.getElementById("txtDileveryAddress2").value = document.getElementById("txtAddress2").value;
                   document.getElementById("txtDileveryAddress3").value = document.getElementById("txtAddress3").value;
                   document.getElementById("TxtDileveryPlace").value = document.getElementById("txtAddPlace").value;
                   document.getElementById("txtDileveryPincode").value = document.getElementById("txtPin").value;
                   
                   document.getElementById("TxtDileveryPhone").value = document.getElementById("txtPhone").value;
                   document.getElementById("TxtDileveryFax").value = document.getElementById("txtFax").value;
                   
                   document.getElementById("DDLDileveryName").selectedIndex= document.getElementById("ddlname").selectedIndex;
                   document.getElementById("DDLDileveryState").selectedIndex = document.getElementById("ddlState").selectedIndex;
                   document.getElementById("DDLDileveryCountry").selectedIndex = document.getElementById("ddlCountry").selectedIndex;
                   

                }
                else if (chkadd.checked == false)
                {
                     document.getElementById("txtDileveryName").value ='';
                     document.getElementById("DDLDileveryName").value ='';
                     document.getElementById("TxtDileveryPhone").value ='';
                      document.getElementById("TxtDileveryPlace").value ='';
                       document.getElementById("TxtDileveryFax").value ='';
                     document.getElementById("txtDileveryPincode").value ='';
                     document.getElementById("DDLDileveryState").value ='';
                     document.getElementById("DDLDileveryCountry").value ='';
                     document.getElementById("txtDileveryAddress1").value ='';
                     document.getElementById("txtDileveryAddress2").value = '';                     
                     document.getElementById("txtDileveryAddress3").value = '';                          
                }
            }
    </script> 
</head>

    
<body onload="return setDebitCredit()">
    <form id="form1" runat="server" defaultbutton="BtnUpdate">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true"></asp:ScriptManager>        
    <acc:heading ID="pagehead" runat="server" HeadingText="Ledger" />
    
    
    <%--<asp:UpdatePanel ID="UpdatePanel4" runat="server">
     <ContentTemplate>--%>
    <div>
       
           <div style="text-align:center; width:50%; margin-left:22%; margin-right:25%"><asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label></div> 
            <br />
            <table  class="tablecontentnoborder" style ="width:80%; margin-left:5%; margin-right:18%; padding: 0px; border:1px solid #818181;">
            <tr>
                <td class="headtd" colspan="2"> Ledger Details</td>
            </tr>
            
            <tr>
                <td> Name <span class="required">*</span></td>
                <td> 
                    <asp:TextBox ID="TxtName" runat="server" CssClass ="input" ToolTip="Enter Name" AutoCompleteType="Disabled" onKeyUp="return GetTextBoxValue1(this.id)" ValidationGroup="V" ></asp:TextBox>
                    <asp:CheckBox ID="CHKAvtive" runat="server" Text="Active"/> 
                    <asp:RequiredFieldValidator ID="RFVName" runat="server"  ControlToValidate="TxtName" ErrorMessage="Provide Name" ValidationGroup="V" />
                    <%--&nbsp;<asp:LinkButton ID="btnSalePerson" runat="server" Text="Sale Person"></asp:LinkButton>--%>
                </td>
            </tr>    
            <tr>        
                <td> Alternate Name &nbsp; &nbsp; </td>
                <td> 
                    <asp:TextBox ID="TxtAlterName" runat="server" ToolTip="Enter Alternate Name" CssClass ="input" ></asp:TextBox>&nbsp;
                    <%--<asp:LinkButton ID="btnPriceGroup" runat="server" Text="Price Group"></asp:LinkButton>--%>
                
                </td>          
            </tr>
                
                <tr>
                    <td></td>
                    <td> <asp:CheckBox ID="ChkSubLedger" runat="server" AutoPostBack="true" Text="Is sub ledger account" oncheckedchanged="ChkSubLedger_CheckedChanged"  /> </td>
                                
                </tr>
                
                <tr>
                    <td> </td>
                    <td> <asp:CheckBox ID ="CHKAllow" runat="server" AutoPostBack="true" Text="Allow sub accounts under this ledger" OnCheckedChanged="CHKAllow_CheckedChanged" /> </td>
                </tr>
                
                <tr>
                    <td> Group Name <span class="required">*</span></td>
                    <td> 
                        <asp:DropDownList ID="DDLGroupName" runat="server" Width="240" CssClass="dropdown"></asp:DropDownList>
                    </td>
                </tr>
                
                <tr>
                    <td> Opening Balance </td>
                    <td><asp:TextBox ID="TxtOpeningBal" runat="server" ToolTip="Opening Balance" CssClass ="inputnumber" Text="0.00" onKeyPress= "return isNumberKey(this.id,event)" onKeyUp="GetTextBoxValue(this.id)" onBlur="SetZero(this.id)"></asp:TextBox> 
                        <asp:DropDownList ID="DDLServices" runat="server" AutoPostBack="true" onChange="return setDebitCredit()" ></asp:DropDownList>
                        <asp:CheckBox ID="CHKBillWise" runat="server" Text="Apply Billwise" Checked="True" /></td>
                </tr>
                
                <tr>
                    <td> Closing Balance</td>
                    <td > <asp:TextBox ID="TxtClosing" ToolTip="Closing Balance" runat="server"  CssClass ="inputnumber"  ReadOnly="false" onKeyPress= "return isNumberKey(this.id,event)" Enabled="false"></asp:TextBox></td>                   
                </tr>
                
                <tr>
                    <td> &nbsp; &nbsp;</td>
                </tr>   
                
                 <tr>
                     <td> &nbsp;</td>
                 </tr>
                      
                </table>
             </div>
           
            <div id="wrapper">    
                <ul class="tabs">
                    <li><a href="javascript:void(0)" class="defaulttab" rel="tabtaxdetails">Tax Details</a></li>
                    <li><a href="javascript:void(0)" rel="TabAddress">Address</a></li>
                    <li><a href="javascript:void(0)" rel="TabDeliveryAdress">Delivery Address</a></li>
                    <li><a href="javascript:void(0)" rel="ContactsTabs">Contacts</a></li>
                    <li><a href="javascript:void(0)" rel="TabRegistrations1">Registrations</a></li>
                    <li><a href="javascript:void(0)" rel="TabOtherDetails">Other Details</a></li>
                     <li><a href="javascript:void(0)" rel="TabTermsCondition">Terms & Condition</a></li>
                </ul>          
                    <div class="tab-content" id="tabtaxdetails" runat="server">
                        
                        <div style="margin-left:20px; margin-top:15px; width:90%">
                     <table class="tablecontent" style="width:100%">
                                <tr>
                                    <td class="headtd" colspan="2"> Tax Details</td>
                                </tr>
                                
                                <tr>
                                    <td> <asp:CheckBox ID="ChkTDS" runat="server" Text="TDS Applicable" /></td>
                                    <td><asp:CheckBox ID="ChkTaxType" runat="server" Text="Tax Type" /></td>                                   
                                </tr>
                                
                                <tr>
                                    <td> 
                                        Status &nbsp; &nbsp; &nbsp; <asp:DropDownList ID ="DDLStatus" runat="server"></asp:DropDownList>
                                    </td>
                                    <td>
                                        Tax Type &nbsp; &nbsp;<asp:DropDownList ID="DDLTaxType" runat="server" Width="150" AutoPostBack="true" OnSelectedIndexChanged="DDLTaxType_SelectedIndexChanged" ></asp:DropDownList> 
                                    </td>
                                </tr>
                                
                                <tr>  
                                     <td></td>                                                            
                                    <td> 
                                        Main Class &nbsp;<asp:DropDownList ID="DDLMainClass" runat="server" Width="150" AutoPostBack="true" OnSelectedIndexChanged="DDLMainClass_SelectedIndexChanged" ></asp:DropDownList>
                                    </td>
                                </tr>
                                
                                <tr>                                    
                                    <td> 
                                        <asp:CheckBox ID="ChkService" runat="server" Text="Service Tax Applicable" />
                                    </td>
                                    <td> 
                                        Sub Class &nbsp; &nbsp;<asp:DropDownList ID="DDLSubClass" runat="server" Width="150"></asp:DropDownList>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td> 
                                        <asp:CheckBox ID="ChkCost" runat="server" Text="Cost Center Effected" />
                                    </td>
                                </tr>  
                                
                                      <tr>
                                        <td> &nbsp;</td>                                        
                                      </tr>
                                                                                                  
                            </table> 
                            </div>
                          </div>
                    
                     <div class="tab-content" id="TabAddress" runat="server">
                            <table class="tablecontent" style="width:100%">
                                    <tr>
                                        <td class="headtd" colspan="4"> Address</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Name</td>
                                        <td> 
                                            <asp:DropDownList ID="ddlName" runat="server"></asp:DropDownList>
                                            <asp:TextBox ID="txtAddName" runat="server" CssClass="input" Width="194px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>  
                                        <td style="vertical-align:top;"> 
                                            Address</td>
                                         <td>
                                             <asp:TextBox ID="txtAddress1" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                         </td>                                                            
                                    </tr>
                                    <tr>                                    
                                        <td> 
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAddress2" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        </td>
                                    </tr>                                    
                                    <tr>
                                        <td>
                                        </td>
                                        <td> 
                                            <asp:TextBox ID="txtAddress3" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td>
                                            Place
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAddPlace" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        </td>
                                        <td>
                                            Pincode
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPin" runat="server" CssClass="input" MaxLength="6" Width="250px"></asp:TextBox>
                                        </td>
                                    </tr>                             
                                    <tr> 
                                        <td> 
                                            State
                                        </td>
                                        <td> 
                                            <asp:DropDownList ID="ddlState" runat="server"></asp:DropDownList>
                                        </td>                         
                                        <td>
                                            Country
                                        </td>
                                        <td>                                                   
                                            <asp:DropDownList ID="ddlCountry" runat="server">
                                            <asp:ListItem Text="India" Value="1"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>                                                               
                                    <tr>
                                        <td>
                                            Phone</td>
                                        <td>
                                            <asp:TextBox ID="txtPhone" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        </td>
                                        <td>
                                            Fax
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtFax" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Email</td>
                                        <td>
                                            <asp:TextBox ID="txtEmail" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                                                ControlToValidate="txtEmail" ErrorMessage="*" 
                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                        </td>
                                        <td>
                                            Website                                        
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtWebsite" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="revWebsite" runat="server" 
                                                ControlToValidate="txtWebsite" ErrorMessage="*" 
                                                ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                </table>
                                                    
                     </div> 
                 
                        <div class="tab-content" id="TabDeliveryAdress" runat="server">
                          <div style="margin-left:20px; margin-bottom:5px;">
                            <asp:CheckBox ID="chk" runat="server" onclick="selectaddress();" Text="Same as address" /> 
                          </div>
                          <div style="clear:both;"></div> 
                       <div style="margin-left:20px; margin-top:15px; width:40%; float:left">                        
                            <table class="tablecontent" style="width:100%">
                                <tr>
                                    <td class="headtd" colspan="2"> Delivery Address Details</td>
                                </tr>                                
                                <tr>
                                    <td>Name</td>
                                    <td> <asp:DropDownList ID="DDLDileveryName" runat="server"></asp:DropDownList>&nbsp;
                                    <asp:TextBox ID="txtDileveryName" CssClass ="input"  Width="184px" runat="server"></asp:TextBox></td>
                                </tr>
                                
                                <tr>
                                    <td style="vertical-align:top"> 
                                        Address
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtDileveryAddress1" runat="server" CssClass ="input" Width="250px"></asp:TextBox>
                                    </td>                                                      
                                </tr>
                                
                                <tr>
                                    <td> </td>
                                    <td> 
                                        <asp:TextBox ID="txtDileveryAddress2" runat="server" CssClass ="input" Width="250px" ></asp:TextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td> </td> 
                                    <td> 
                                        <asp:TextBox ID="txtDileveryAddress3" runat="server" Width="250px" CssClass ="input"></asp:TextBox> </td> 
                                      
                                </tr>
                                <tr>
                                    <td> </td>
                                    <td> 
                                        <asp:TextBox ID="txtDileveryAddress4" runat="server" CssClass ="input" Width="250px" ></asp:TextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        Place
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="TxtDileveryPlace" runat="server" Width="250px" CssClass="input" ></asp:TextBox>
                                    </td>
                                   
                                </tr>
                                <tr> 
                                    <td> 
                                        Pincode
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtDileveryPincode" runat="server" Width="250px" CssClass ="input"></asp:TextBox>
                                    </td>
                                              
                                </tr>
                                <tr>
                                    <td> 
                                        State
                                    </td>
                                    <td> 
                                        <asp:DropDownList ID="DDLDileveryState" runat="server" ></asp:DropDownList>
                                    </td>
                                    
                                </tr>
                                <tr> 
                                    <td> 
                                        Country 
                                    </td>
                                    <td> <asp:DropDownList ID="DDLDileveryCountry" runat="server">
                                            <asp:ListItem Text="India" Value="1"></asp:ListItem>
                                            </asp:DropDownList>
                                       
                                    </td>  
                                   
                                </tr>  
                                   <tr>
                                    <td>
                                        Phone
                                    </td>
                                    <td>
                                       <asp:TextBox ID="TxtDileveryPhone" runat="server" Width="250px" CssClass ="input"></asp:TextBox>
                                    </td>
                                </tr>           
                                 <tr>
                                    <td>
                                        Fax
                                    </td>
                                    <td>
                                       <asp:TextBox ID="TxtDileveryFax" runat="server" Width="250px" CssClass ="input"></asp:TextBox>
                                    </td>
                                </tr>                                                                                    
                            </table> 
                        </div>
                        <div style="margin-left:45px; margin-top:15px;width:40%; float:left"> 
                            <table class="tablecontent" style="width:100%">
                                <tr>               
                                    <td class="headtd" colspan="2"> Registration Details</td>   
                                </tr>
                                <tr>
                                    <td> 
                                        VAT TIN No.
                                    </td>
                                    <td> 
                                        Date
                                    </td>        
                                </tr>
                                <tr>
                                    <td> 
                                        <asp:TextBox ID="txtVat" runat="server" CssClass="input" Width="70px"></asp:TextBox>  
                                    </td>
                                    <td>  
                                        <asp:TextBox ID="txtDeliveryVatDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>                                        
                                        <asp:ImageButton ID="ImgDeliveryVat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalExtDeliveryvat" runat="server" TargetControlID ="txtDeliveryVatDate" PopupButtonID="ImgDeliveryVat" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="DeliveryvatDateMask"  runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtDeliveryVatDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="DeliveryvatDateValmask" runat="server"
                                            ControlExtender="DeliveryvatDateMask" ControlToValidate="txtDeliveryVatDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ValidationGroup="CompanyInfo" />                                   
                                    </td>
                                </tr>
                                <tr>       
                                    <td> 
                                        Inter State Tax Regn.
                                    </td>
                                    <td> 
                                        Date
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        <asp:TextBox ID="txtDeliveryInterState" runat="server" Width="80px" CssClass ="input" ></asp:TextBox> 
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtDeliveryInterStateDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnInterState" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalDateDeliveryInterState" runat="server" 
                                            TargetControlID ="txtDeliveryInterStateDate" 
                                            PopupButtonID="ImgBtnInterState" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="DeliveryInterStateDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtDeliveryInterStateDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="DeliveryInterStateDateValmask" runat="server"
                                            ControlExtender="DeliveryInterStateDateMask" ControlToValidate="txtDeliveryInterStateDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ValidationGroup="CompanyInfo"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        CENVAT
                                    </td>
                                    <td> 
                                        Date 
                                    </td>                     
                                </tr>   
                                <tr>
                                    <td> 
                                        <asp:TextBox ID="txtDeliveryCENVAT" runat="server" Width="80px" CssClass ="input" ></asp:TextBox> 
                                    </td>
                                    <td>  
                                        <asp:TextBox ID="txtDeliveryCENVATDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnDeliveryCVNNETDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalDateDeliveryCVNNET" runat="server" 
                                            TargetControlID ="txtDeliveryCENVATDate" 
                                            PopupButtonID="ImgBtnDeliveryCVNNETDate" Format="dd/MM/yyyy" Enabled="True" /> 
                                        <ajaxToolkit:MaskedEditExtender ID="CVNNETDeliveryDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtDeliveryCENVATDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="CVNNETDeliveryDateValmask" runat="server"
                                            ControlExtender="CVNNETDeliveryDateMask" ControlToValidate="txtDeliveryCENVATDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ValidationGroup="CompanyInfo" ErrorMessage="AccountStartValmask" />                                         
                                    </td>  
                                </tr>
                            </table>
                        </div>   
                          <div style="clear:both;"></div>   
                      
                        </div>
                    <div class="tab-content" id="ContactsTabs" runat="server">
                           
                    
                    <div style="margin:15px 0px 0px 20px; width:90%">
                        <table class="tablecontent" style="width:100%">
                            <tr>
                                <td class="headtd" colspan="2"> 
                                    Contacts
                                </td>
                            </tr>
                            <tr>
                                <td style="width:25%"> 
                                    Contact Person
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactPerson" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>                        
                            <tr>  
                                <td>
                                    Position
                                </td>                                                            
                                <td> 
                                    <asp:TextBox ID="txtContactPosition" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>                                    
                                <td> 
                                    Phone
                                </td>
                                <td> 
                                    <asp:TextBox ID="txtContactPhone" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td> 
                                    Mobile
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactMobile" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>                            
                                <td> 
                                    E-mail
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactEmail" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>                      
                            <tr> 
                                <td> 
                                    Fax
                                </td>                         
                                <td> 
                                    <asp:TextBox ID="txtContactFax" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>    
                            </tr>                                                               
                            <tr>
                                <td>
                                    Remarks
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContactRemarks" runat="server" CssClass ="input" Width="230px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                  </div>         
                    
                  <div class="tab-content" id="TabRegistrations1" runat="server">  
          
                        <div style="margin:15px 0px 0px 20px; width:90%">
                            <table class="tablecontent" style="width:100%">
                                <tr>
                                    <td class="headtd" colspan="2"> 
                                        Registrations
                                    </td>
                                </tr>
                                <tr> 
                                    <td style="width:25%"> 
                                        Permanent A/C No.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegPAN" runat="server"  CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegPANDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnPermanantDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalExtPermanant" runat="server" TargetControlID ="txtRegPANDate"  PopupButtonID="ImgBtnPermanantDate" Format="dd/MM/yyyy"  Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="PermanantDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegPANDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":">
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="PermanantDateValmask" runat="server"
                                            ControlExtender="PermanantDateMask" ControlToValidate="txtRegPANDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>
                                <tr> 
                                    <td> 
                                        PAN References
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegPanRef" runat="server"  CssClass ="input" ></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        Tax Deduction No.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegTaxDeduction" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegTaxDeductionDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnTaxDeduction" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalExtTaxDeduction" runat="server" TargetControlID ="txtRegTaxDeductionDate" PopupButtonID="ImgBtnTaxDeduction" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="TaxDeductionDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegTaxDeductionDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="TaxDeductionDateValmask" runat="server"
                                            ControlExtender="TaxDeductionDateMask" ControlToValidate="txtRegTaxDeductionDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>                                
                                <tr>
                                    <td> 
                                        VAT TIN No.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegVAT" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegVATDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnvat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalExtvat" runat="server" TargetControlID ="txtRegVATDate"  PopupButtonID="ImgBtnvat" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="vatDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegVATDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="vatDateValmask" runat="server"
                                            ControlExtender="vatDateMask" ControlToValidate="txtRegVATDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        Inter State Tax Regn.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegInterState" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegInterStateDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnInterState1" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalDateInterState" runat="server" TargetControlID ="txtRegInterStateDate" PopupButtonID="ImgBtnInterState1" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="InterStateDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegInterStateDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="InterStateDateValmask" runat="server"
                                            ControlExtender="InterStateDateMask" ControlToValidate="txtRegInterStateDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        Service Tax Regn No.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegServicetax" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegServiceTaxDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnServiceTax" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalDateServicetax" runat="server" TargetControlID ="txtRegServiceTaxDate"  PopupButtonID="ImgBtnServiceTax" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="ServiceTaxDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegServiceTaxDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>  
                                        <ajaxToolkit:MaskedEditValidator ID="ServiceTaxDateValmask" runat="server"
                                            ControlExtender="ServiceTaxDateMask" ControlToValidate="txtRegServiceTaxDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                       CENVAT
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegCVNNET" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegCVNNETDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnCVNNET" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalDateCVNNET" runat="server"  TargetControlID ="txtRegCVNNETDate" PopupButtonID="ImgBtnCVNNET" Format="dd/MM/yyyy"  Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="CVNNETxDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegCVNNETDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="CVNNETDateValmask" runat="server"
                                            ControlExtender="CVNNETxDateMask" ControlToValidate="txtRegCVNNETDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ValidationGroup="CompanyInfo" ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                        Luxury Tax Regn No.
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtRegLuxury" runat="server" CssClass ="input" ></asp:TextBox>
                                        <asp:TextBox ID="txtRegLuxuryDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                        <asp:ImageButton ID="ImgBtnLuxury" runat="server" ImageUrl="~/Images/calendar.gif" />
                                        <ajaxToolkit:CalendarExtender ID="CalExtLuxury" runat="server" TargetControlID ="txtRegLuxuryDate" PopupButtonID="ImgBtnLuxury" Format="dd/MM/yyyy" Enabled="True" />
                                        <ajaxToolkit:MaskedEditExtender ID="LuxuryDateMask"
                                            runat="server" CultureName="en-GB" Enabled="True"
                                            TargetControlID="txtRegLuxuryDate"
                                            MaskType="Date" DisplayMoney="Left" 
                                            AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" 
                                            CultureAMPMPlaceholder="AM;PM" CultureCurrencySymbolPlaceholder="£" 
                                            CultureDateFormat="DMY" CultureDatePlaceholder="/" 
                                            CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," 
                                            CultureTimePlaceholder=":" >
                                        </ajaxToolkit:MaskedEditExtender>
                                        <ajaxToolkit:MaskedEditValidator ID="LuxuryDateValmask" runat="server"
                                            ControlExtender="LuxuryDateMask" ControlToValidate="txtRegLuxuryDate"
                                            EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                            Display="Dynamic" EmptyValueBlurredText="*" 
                                            ErrorMessage="AccountStartValmask" />
                                    </td>
                                </tr>                                
                            </table>
                         </div>
                         </div>
                   
                   <div class="tab-content" id="TabOtherDetails" runat="server" >
                    <div style="margin:15px 0px 0px 20px; width:90%">
                            <table class="tablecontent" style="width:100%">                            
                                <tr>
                                    <td class="headtd" colspan="4"> Other Details</td>
                                </tr>
                                <tr>
                                    <td> 
                                        Credit Period
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtCreditPeriod" runat="server" CssClass="inputnumber" onKeyPress= "return isNumberKey(this.id,event)" Text="0" MaxLength="3" onblur="validateperiod()"></asp:TextBox>&nbsp;Days
                                    </td>
                                    <td> 
                                        Credit Limit(Rs.)
                                    </td>
                                    <td> 
                                        <asp:TextBox ID="txtCreditLimit" runat="server" CssClass="inputnumber" onKeyPress= "return isNumberKey(this.id,event)" Text="0"> </asp:TextBox> 
                                    </td>
                                </tr> 
                                <tr>
                                    <td> 
                                    <asp:Label ID="lblSalesPersonMain" runat="server"></asp:Label>
                                      <%--  <asp:LinkButton ID="btnSalePerson" runat="server"></asp:LinkButton>--%>
                                 </td>                                
                                    <td> 
                                        <asp:DropDownList ID="ddlSalePerson" runat="server" Width="155px"></asp:DropDownList>
                                    </td>                                
                                    <td> 
                                    <asp:Label ID="lblPriceGroup" runat="server" Text="Price Group"></asp:Label>
                                        <%--<asp:LinkButton ID="btnPriceGroup" runat="server" Text="Price Group"></asp:LinkButton>--%>
                                    </td> 
                                    <td> 
                                        <asp:DropDownList ID="ddlPriceGroup" runat="server" Width="155px"></asp:DropDownList>
                                    </td>                        
                                    
                                </tr>
                                <tr>
                                    <td class="headtd" colspan="4">
                                        Tax Group
                                    </td>
                                </tr>
                                <tr> 
                                    <td> 
                                        Purchase 
                                    </td>
                                    <td> 
                                     <asp:DropDownList ID="ddlPurchase" runat="server" Width="155px" AutoPostBack="true" ></asp:DropDownList>
                                    </td>
                                    <td> 
                                        Sales
                                    </td>
                                    <td> 
                                       <asp:DropDownList ID="ddlSales" runat="server" Width="155px" AutoPostBack="true" ></asp:DropDownList>
                                    </td>
                                </tr>
                                <tr> 
                                    <td> 
                                        &nbsp;
                                    </td>
                                    <td colspan="3"> 
                                        <asp:CheckBox ID="chkApplyTCS" runat="server" Text="Apply TCS" />
                                    </td>                                    
                                </tr>                                                   
                            </table>                           
                        
                        
                        </div>
                        </div>
                        
                    <div  class="tab-content"  id="TabTermsCondition" runat="server" >
                     
                            <table class="tablecontent" style="width:100%">
                                <tr>
                                    <td class="headtd"> 
                                        Terms & Condition
                                    </td>
                                </tr>
                                <tr>
                                    <td> 
                                       <asp:ListBox ID="lstTermCondition" runat="server" SelectionMode="Multiple" Width="95%" Height="150px"></asp:ListBox>
                                     </td>
                                </tr>  
                                 <tr>
      &nbsp;
                                    </td>
                                </tr>       
                            </table> 
                            </div>
                            
                            
                                                                             
            </div>
            
            <div style="margin :10px 5% 0px 5%" align="center">
               <table>
                 <tr> 
                      <td> 
                        <asp:Button ID="BtnUpdate" Text="Update" runat="server" CssClass="button" 
                              ValidationGroup="V" onclick="BtnUpdate_Click" />&nbsp;  
                        <asp:Button ID="BtnClose" runat="server" Text="Close" CssClass="button" onclick="BtnClose_Click"  />
                      </td>
                 </tr>   
                </table> 
              </div>
          <%--   </ContentTemplate>
           </asp:UpdatePanel>--%>
   
    </form>
</body>
</html>
